package com.rm.zeyou.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * <p>
 * 用户表
 * </p>
 *
 * @author YanYang
 * @since 2025-03-12 15:55:09
 */
@Getter
@Setter
@TableName("t_user")
@ApiModel(value = "User对象", description = "用户表")
public class User implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("用户ID")
      @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty("公众号openid")
    @TableField("open_id")
    private String openId;

    @ApiModelProperty("unionid")
    @TableField("unionid")
    private String unionid;

    @ApiModelProperty("电话")
    @TableField("user_tel")
    private String userTel;

    @ApiModelProperty("APPopenid")
    @TableField("app_open_id")
    private String appOpenId;

    @ApiModelProperty("性别（0=男）")
    @TableField("user_sex")
    private Integer userSex;

    @ApiModelProperty("头像")
    @TableField("user_avatar")
    private String userAvatar;

    @ApiModelProperty("昵称")
    @TableField("user_nike_name")
    private String userNikeName;

    @ApiModelProperty("微信昵称")
    @TableField("user_wx_name")
    private String userWxName;

    @ApiModelProperty("余额")
    @TableField("user_balance")
    private BigDecimal userBalance;

    @ApiModelProperty("邀请码")
    @TableField("user_invitation_code")
    private String userInvitationCode;

    @ApiModelProperty("上级被邀请")
    @TableField("user_invited_code")
    private String userInvitedCode;

    @ApiModelProperty("来源")
    @TableField("user_source")
    private Integer userSource;

    @ApiModelProperty("身份（0=普通 1=业务员 2=渠道商）")
    @TableField("user_identity")
    private Integer userIdentity;

    @ApiModelProperty("地区")
    @TableField("user_region")
    private String userRegion;

    @ApiModelProperty("用户标签")
    @TableField("user_label")
    private String userLabel;

    @ApiModelProperty("是否为第一次登录（1=第一次 0=否）")
    @TableField("is_first_login")
    private Integer isFirstLogin;

    @ApiModelProperty("逻辑删除（0=未删除，1=已删除）")
    @TableField("is_delete")
    @TableLogic
    private Integer isDelete;

    @ApiModelProperty("创建时间")
      @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;

    @ApiModelProperty("更新时间")
      @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;


}
